package hoangbn.apps;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener {

	private Button btnFood, btnDrink;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		initView();
	}

	private void initView() {
		btnFood = (Button) findViewById(R.id.btnFood);
		btnDrink = (Button) findViewById(R.id.btnDrink);

		// set click listener
		btnFood.setOnClickListener(this);
		btnDrink.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		if (v == btnFood) {
			Intent i = new Intent(this,PlacesActivity.class);
			this.startActivity(i);
		}
	}
}
